package com.loong.nnm.controller;

import com.loong.nnm.services.PGServices;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class PGController {

    @Resource
    PGServices pgServices;

    @GetMapping("/node/{node}/pgs")
    public String getPGs(@PathVariable String node) {
        System.out.println(node);
        return pgServices.getPGs(node);
    }

    @GetMapping("/node/{node}/lags")
    public String getLAGs(@PathVariable String node) {
        System.out.println(node);
        return pgServices.getLAGs(node);
    }
}
